public class Date {
    public int year;
    public int month;
    public int day;

//    public void setDate(Date this,int y,int m,int d){
//        this.year = y;
//        this.month = m;
//        this.day = d;
//    }

//    public void setDate(int year,int month,int day){
//        this.year = year;
//        this.month = month;
//        this.day = day;
//    }


    //    构造方法(不带参数的方法)：

    public Date(int year,int month,int day){
        this.year = year;
        this.month = month;
        this.day = day;
        System.out.println("Date(int,int,int)");
    }
    public Date(){
//        this.year = 2024;
//        this.month = 11;
//        this.day = 29;

//        this()能够调用当前对象的其他构造方法
        this(2024,11,29);
//      且 this() 必须是在第一行
        System.out.println("Date()");
    }




    public void printDate(){
        System.out.println(this.year + "年"
                         + this.month + "月"
                         + this.day + "日");
    }




}
